package com.systop.scos.diary.diaryType.service;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.systop.core.service.BaseGenericsManager;
import com.systop.scos.diary.diaryType.model.DiaryType;
/**
 * 日志类别维护
 * @author yj
 *
 */
@SuppressWarnings({ "unchecked", "rawtypes" })
@Service
public class DiaryTypeManager extends BaseGenericsManager<DiaryType> {

	public Map getDiaryTypeMap() {
		List<DiaryType> diaryTypeList = query("from DiaryType");
		Map diaryTypeMap = new LinkedHashMap();
		for(DiaryType dt:diaryTypeList){
			diaryTypeMap.put(dt.getId(), dt.getName());
		}
		return diaryTypeMap;
	}

}
